package cn.wolfcode.luowowo.website.web.controller;

import cn.wolfcode.luowowo.common.util.AjaxResult;
import cn.wolfcode.luowowo.member.domain.UserInfo;
import cn.wolfcode.luowowo.website.web.annotation.UserParam;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class CheckLogin {

    @RequestMapping("/checkLogin")
    @ResponseBody
    public Object checkLogin(@UserParam UserInfo userInfo){
        if(userInfo != null){
            return AjaxResult.success();
        }else{
            return AjaxResult.FAIL;
        }
    }
}
